package com.sss.service.impl;

import com.sss.entity.WmProductRecpt;
import com.sss.mapper.WmProductRecptMapper;
import com.sss.service.WmProductRecptService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
 * 产品入库录表(WmProductRecpt)表服务实现类
 *
 * @author makejava
 * @since 2023-12-14 16:55:32
 */
@Service("wmProductRecptService")
public class WmProductRecptServiceImpl implements WmProductRecptService {
    @Autowired
    private WmProductRecptMapper wmProductRecptMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param recptId 主键
     * @return 实例对象
     */
    @Override
    public WmProductRecpt queryById(Long recptId) {
        return this.wmProductRecptMapper.queryById(recptId);
    }

    /**
     * 分页查询
     *
     * @return 查询结果
     */
    @Override
    public List<WmProductRecpt> queryByPage(Long pageNum) {
        return this.wmProductRecptMapper.queryAllByLimit();
    }

    /**
     * 新增数据
     *
     * @param wmProductRecpt 实例对象
     * @return 实例对象
     */
    @Override
    public int insert(WmProductRecpt wmProductRecpt) {
        return this.wmProductRecptMapper.insert(wmProductRecpt);
    }

    /**
     * 修改数据
     *
     * @param wmProductRecpt 实例对象
     * @return 实例对象
     */
    @Override
    public int update(WmProductRecpt wmProductRecpt) {
        return this.wmProductRecptMapper.update(wmProductRecpt);
    }

    /**
     * 通过主键删除数据
     *
     * @param recptId 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Long recptId) {
        return this.wmProductRecptMapper.deleteById(recptId) > 0;
    }
}
